package com.example.patterns.visitor;

import java.util.ArrayList;
import java.util.List;

import com.example.patterns.visitor.generator.ReportGenerator;
import com.example.patterns.visitor.generator.User;
import com.example.patterns.visitor.generator.UserHyphenedFileGenerator;
import com.example.patterns.visitor.generator.UserPipedFileGenerator;

public class ClientVisitor {
	public static void main(String... args){
		IVisitable elementVisitable = new ElementVisitable();
		IVisitor componentVisitor = new ComponentVisitor();
		
		elementVisitable.process(componentVisitor);
		
		List<User> items = new ArrayList<>();
		User user = new User("Mau", "TiMe");
		items.add(user);
		user = new User("Mau", "TiMe");
		items.add(user);
		
		ReportGenerator<User> generator = new ReportGenerator<>(items);
		generator.process(new UserPipedFileGenerator());
		generator.process(new UserHyphenedFileGenerator());
	}
}